﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductResourceSearch.aspx.cs" Inherits="CRM.Web.VehicleManage.ProductResourceSearch" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <base target="_self"/>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/pop.css" %>" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js" defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" defer="defer"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js" defer="defer"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    
    <script type="text/javascript" defer="defer">
        $(document).ready(function() {
            $('.row').bind("dblclick", function() {
                $(this).find("a[id$='lbtnSelected']").click();
            }).attr("style", "cursor:hand; cursor:pointer;");
            $('.row2').bind("dblclick", function() {
                $(this).find("a[id$='lbtnSelected']").click();
            }).attr("style", "cursor:hand; cursor:pointer;");

        });
        
        
        function setValue(productCode, brand, vehicleType, series, models, engineModel, engineManufacturers) {
            var win;
            if (window.opener != null) {
                win = window.opener;
            }
            else if (window.dialogArguments != null) {
                win = window.dialogArguments;
            }
            win.SetVehicleInfo(productCode, brand, vehicleType, series, models, engineModel, engineManufacturers);
            closeSelf();
            return false;
        }
    </script>
   
</head>
<body>
    <form id="form1" runat="server" defaultbutton="btnSearch">
    <table border="0" cellpadding="0" cellspacing="0" id="tTitle">
        <tr>
            <td class="left">
                <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
            </td>
            <td class="middle">
                <div class="pagetitle">
                    <div>
                        <asp:Label ID="lblTitle" runat="server" Text="产品线信息查询"></asp:Label></div>
                </div>
            </td>
            <td class="right">
                <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
            </td>
        </tr>
    </table>
    <div id="divMainPop">
        <div style="width: 100%">
            <div class="listdiv">
                <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                    <tr>
                        <td class="title" style="width: 70px;">
                            <div class="nowrap">
                                产品代码:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtPRODUCTCODE" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                                TextMode="SingleLine"></asp:TextBox>
                        </td>
                        <td class="title" style="width: 50px;">
                            <div class="nowrap">
                                品牌:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtBRAND" runat="server" CssClass="txt" MaxLength="64" Rows="3"
                                TextMode="SingleLine"></asp:TextBox>
                        </td>
                        <td class="title" style="width: 50px;">
                            <div class="nowrap">
                                系列:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtSERIES" runat="server" CssClass="txt" MaxLength="64" Rows="3"
                                TextMode="SingleLine"></asp:TextBox>
                        </td>
                        <td colspan="content" style="width: auto;">
                            &nbsp;
                        </td>
                        <td class="content">
                            <div style="width: 200px;" class="nowrap">
                                <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                                    OnClick="btnSearch_Click" />
                                <input id="btnClose" type="button" value="关 闭" class="btn" onclick="closeSelf();" /></div>
                        </td>
                    </tr>
                </table>
                <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False"
                    OnRowCreated="gvList_RowCreated" OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting"
                    AllowPaging="True" AllowSorting="True" Width="100%" SortExpressionValue="PRODUCTRESOURCEID"
                    OnRowCommand="gvList_RowCommand">
                    <Columns>
                        <asp:BoundField DataField="PRODUCTRESOURCEID" HeaderText="编号" SortExpression="PRODUCTRESOURCEID"
                            Visible="false" />
                        <asp:BoundField DataField="PRODUCTCODE" HeaderText="产品代码" SortExpression="PRODUCTCODE" />
                        <asp:BoundField DataField="BRAND" HeaderText="品牌" SortExpression="BRAND" />
                        <asp:BoundField DataField="VEHICLETYPE" HeaderText="类型" SortExpression="VEHICLETYPE" />
                        <asp:BoundField DataField="SERIES" HeaderText="系列" SortExpression="SERIES" />
                        <asp:BoundField DataField="MODELS" HeaderText="机型" SortExpression="MODELS" />
                        <asp:BoundField DataField="ENGINEMODEL" HeaderText="发动机型号" SortExpression="ENGINEMODEL" />
                        <asp:BoundField DataField="ENGINEMANUFACTURERS" HeaderText="发动机厂家" SortExpression="ENGINEMANUFACTURERS" />
                        <asp:BoundField DataField="BRANDCODE" HeaderText="品牌代码" SortExpression="BRANDCODE"
                            Visible="false" />
                        <asp:BoundField DataField="VEHICLETYPECODE" HeaderText="类型代码" SortExpression="VEHICLETYPECODE"
                            Visible="false" />
                        <asp:BoundField DataField="SERIESCODE" HeaderText="系列代码" SortExpression="SERIESCODE"
                            Visible="false" />
                        <asp:BoundField DataField="MODELSCODE" HeaderText="机型代码" SortExpression="MODELSCODE"
                            Visible="false" />
                        <asp:BoundField DataField="ENGINEMODELCODE" HeaderText="发动机型号代码" SortExpression="ENGINEMODELCODE"
                            Visible="false" />
                        <asp:BoundField DataField="ENGINEMANUFACTURERSCODE" HeaderText="发动机厂家代码" SortExpression="ENGINEMANUFACTURERSCODE"
                            Visible="false" />
                        <asp:BoundField DataField="CREATETIME" HeaderText="创建时间" SortExpression="CREATETIME"
                            Visible="false" />
                        <asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号" SortExpression="CREATEPEOPLEID"
                            Visible="false" />
                        <asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人" SortExpression="CREATEPEOPLE"
                            Visible="false" />
                        <asp:BoundField DataField="LASTMODIFYPEOPLEID" HeaderText="最后修改人编号" SortExpression="LASTMODIFYPEOPLEID"
                            Visible="false" />
                        <asp:BoundField DataField="LASTMODIFYPEOPLE" HeaderText="最后修改人" SortExpression="LASTMODIFYPEOPLE"
                            Visible="false" />
                        <asp:BoundField DataField="LASTMODIFYTIME" HeaderText="最后修改时间" SortExpression="LASTMODIFYTIME"
                            Visible="false" />
                        <asp:BoundField DataField="REMARK" HeaderText="备注" SortExpression="REMARK" Visible="false" />
                        <asp:BoundField DataField="STATUS" HeaderText="状态" SortExpression="STATUS" Visible="false" />
                        <asp:BoundField DataField="GEARTYPE" HeaderText="变速箱型号" SortExpression="GEARTYPE" />
                        <asp:BoundField DataField="GEARCODE" HeaderText="变速箱号" SortExpression="GEARCODE" />
                        <asp:BoundField DataField="SALESPRICE" HeaderText="批发价" SortExpression="SALESPRICE"
                            Visible="false" />
                        <asp:BoundField DataField="PRICE" HeaderText="零售价" SortExpression="PRICE" Visible="false" />
                        <asp:BoundField DataField="COLOR" HeaderText="车身颜色" SortExpression="COLOR" Visible="false" />
                        <asp:BoundField DataField="BULLETINCODE" HeaderText="公告号" SortExpression="BULLETINCODE"
                            Visible="false" />
                        <asp:BoundField DataField="QUICKCODE" HeaderText="速查码" SortExpression="QUICKCODE"
                            Visible="false" />
                        <asp:BoundField DataField="EMISSIONS" HeaderText="排量" SortExpression="EMISSIONS"
                            Visible="false" />
                        <asp:BoundField DataField="SUPPLYCODE" HeaderText="供应商编号" SortExpression="SUPPLYCODE"
                            Visible="false" />
                        <asp:BoundField DataField="SERIALMENO" HeaderText="总成系列号格式定义" SortExpression="SERIALMENO"
                            Visible="false" />
                        <asp:BoundField DataField="BUSINESSDIVISIONID" HeaderText="事业部编号" SortExpression="BUSINESSDIVISIONID"
                            Visible="false" />
                        <asp:BoundField DataField="BUSINESSDIVISIONNAME" HeaderText="事业部名称" SortExpression="BUSINESSDIVISIONNAME"
                            Visible="false" />
                        <asp:BoundField DataField="BUSINESSDIVISIONCODE" HeaderText="事业部代码" SortExpression="BUSINESSDIVISIONCODE"
                            Visible="false" />
                        <asp:TemplateField HeaderText="操作" ShowHeader="False">
                            <ItemTemplate>
                                <div style="white-space: nowrap;">
                                    <asp:LinkButton ID="lbtnSelected" runat="server" Text="选中" OnClientClick='<%# SelectedCommand(Eval("PRODUCTCODE").ToString(), Eval("BRAND").ToString(), Eval("VEHICLETYPE").ToString(), Eval("SERIES").ToString(), Eval("MODELS").ToString(), Eval("ENGINEMODEL").ToString(), Eval("ENGINEMANUFACTURERS").ToString()) %>'></asp:LinkButton>
                                    <asp:HyperLink Visible="false" ID="hlModify" runat="server" NavigateUrl='<%# Eval("PRODUCTRESOURCEID", ModifyUrl) %>'>详细</asp:HyperLink>
                                    <asp:LinkButton ID="lbtnDelete" runat="server" Visible="false" Text="删除" CommandName="Delete"
                                        CausesValidation="False" OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>
                                </div>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle CssClass="row" />
                    <AlternatingRowStyle CssClass="row2" />
                    <HeaderStyle CssClass="header" />
                    <PagerStyle CssClass="pager" />
                </dp:WebGridView>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
